home *** CD-ROM | disk | FTP | other *** search
/ Mobiclic 71 / MOBICLIC 71.ISO / mac / DATA / COMMUN / temp0001 / 00004_Script_gestion des curseurs personnalisés < prev    next >
Text File  |  2004-12-05  |  4KB  |  154 lines

  1. -- gestion des curseurs personnalisΘs
  2.  
  3. -- curseur doigt
  4. on doigt s
  5.   set n = the number of member "doigtM"
  6.   repeat with i=1 to the paramCount
  7.     if value(param(i))<>0 then
  8.       set the cursor of sprite param(i) to [n,n+1]
  9.     else
  10.       listeCurseurs param(i),n
  11.     end if
  12.   end repeat
  13. end doigt
  14.  
  15. -- doigt barrΘ
  16. on doigtBarrΘ s
  17.   set n = the number of member "doigtBarrΘM"
  18.   repeat with i=1 to the paramCount
  19.     if value(param(i))<>0 then
  20.       set the cursor of sprite param(i) to [n,n+1]
  21.     else
  22.       listeCurseurs param(i),n
  23.     end if
  24.   end repeat
  25. end doigt
  26.  
  27. -- curseur main
  28. on main s
  29.   set n = the number of member "mainM"
  30.   repeat with i=1 to the paramCount
  31.     if value(param(i))<>0 then
  32.       set the cursor of sprite param(i) to [n,n+1]
  33.     else
  34.       listeCurseurs param(i),n
  35.     end if
  36.   end repeat
  37. end main
  38.  
  39. -- doigt tournΘ vers la gauche
  40. on reviens s
  41.   set n = the number of member "reviensM"
  42.   repeat with i=1 to the paramCount
  43.     if value(param(i))<>0 then
  44.       set the cursor of sprite param(i) to [n,n+1]
  45.     else
  46.       listeCurseurs param(i),n
  47.     end if
  48.   end repeat
  49. end reviens
  50.  
  51. -- doigt tournΘ vers la droite
  52. on droite s
  53.   set n = the number of member "droiteM"
  54.   repeat with i=1 to the paramCount
  55.     if value(param(i))<>0 then
  56.       set the cursor of sprite param(i) to [n,n+1]
  57.     else
  58.       listeCurseurs param(i),n
  59.     end if
  60.   end repeat
  61. end droite
  62.  
  63. -- doigt tournΘ vers le bas
  64. on doigtBas s
  65.   set n = the number of member "doigtBasM"
  66.   repeat with i=1 to the paramCount
  67.     if value(param(i))<>0 then
  68.       set the cursor of sprite param(i) to [n,n+1]
  69.     else
  70.       listeCurseurs param(i),n
  71.     end if
  72.   end repeat
  73. end doigtBas
  74.  
  75. -- loupe
  76. on loupe s
  77.   set n = the number of member "loupeM"
  78.   repeat with i=1 to the paramCount
  79.     if value(param(i))<>0 then
  80.       set the cursor of sprite param(i) to [n,n+1]
  81.     else
  82.       listeCurseurs param(i),n
  83.     end if
  84.   end repeat
  85. end loupe
  86.  
  87. -- loupe nΘgative
  88. on loupeM s
  89.   set n = the number of member "loupe-M"
  90.   repeat with i=1 to the paramCount
  91.     if value(param(i))<>0 then
  92.       set the cursor of sprite param(i) to [n,n+1]
  93.     else
  94.       listeCurseurs param(i),n
  95.     end if
  96.   end repeat
  97. end loupeM
  98.  
  99. -- pinceau
  100. on pinceau s
  101.   set n = the number of member "pinceauM"
  102.   repeat with i=1 to the paramCount
  103.     if value(param(i))<>0 then
  104.       set the cursor of sprite param(i) to [n,n+1]
  105.     else
  106.       listeCurseurs param(i),n
  107.     end if
  108.   end repeat
  109. end pinceau
  110.  
  111. -- oeil
  112. on oeil s
  113.   set n = the number of member "coeilM"
  114.   repeat with i=1 to the paramCount
  115.     if value(param(i))<>0 then
  116.       set the cursor of sprite param(i) to [n,n+1]
  117.     else
  118.       listeCurseurs param(i),n
  119.     end if
  120.   end repeat
  121. end oeil
  122.  
  123. -- Θquerre
  124. on equerre s
  125.   set n = the number of member "equerreM"
  126.   repeat with i=1 to the paramCount
  127.     if value(param(i))<>0 then
  128.       set the cursor of sprite param(i) to [n,n+1]
  129.     else
  130.       listeCurseurs param(i),n
  131.     end if
  132.   end repeat
  133. end equerre
  134.  
  135. -- suppression des curseurs
  136. on doigtOff s
  137.   repeat with i=1 to the paramCount
  138.     if value(param(i))<>0 then
  139.       set the cursor of sprite param(i) to 0
  140.     else
  141.       listeCurseurs param(i),0
  142.     end if
  143.   end repeat
  144. end doigtOff
  145.  
  146. -- gestion d'une liste de pistes du type "[premiΦre piste]>[derniΦre piste]"
  147. on listeCurseurs chaine,n
  148.   set o=offset(">", chaine)
  149.   set n1=value(char 1 to o-1 of chaine)
  150.   set n2=value(char o+1 to length(chaine) of chaine)
  151.   repeat with j=n1 to n2
  152.     set the cursor of sprite j to [n,n+1]
  153.   end repeat
  154. end listeCurseurs